home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #2 / Amiga Plus CD - 1999 - No. 2.iso / System-Boost / Workbench / Archive / ViewDiz / ViewDiz-extras / Developer / .template
Encoding:
AmigaDOS Script File  |  1998-11-09  |  1.6 KB  |  55 lines

  1. .key file/a,cmd/a,desc
  2. .def desc=t:file_id.diz
  3. .bra {
  4. .ket }
  5.  
  6. ;ARGUMENT EXPLANATION:
  7. ; {file} = Filename with full path, no quotes included.
  8. ; {cmd}  = Command from viewdiz (Read, Write, eXecute, Delete, Info, Edit).
  9. ; {desc} = Filename of description = t:file_id.diz
  10. ;
  11. ;VARIABLES:
  12. ; "xpkstatus" (local):
  13. ;  boolean; 1 if {file} is xpk-packed (read only)
  14. ;
  15. ; "viewdiz/.minf" (global):
  16. ;  Used by future prefs program and should be set when {cmd}=info.
  17. ;  See documentation for details.
  18. ;
  19. ;WARNING:
  20. ; Using the C:Quit command can cause troubles, as it will quit ALL scripts
  21. ; in progress. Use LAB/SKIP instead.
  22.  
  23. if {cmd} eq "read"
  24.  ;Extract the description from {file} - Place it in {desc}. This will
  25.  ;be called each time viewdiz detects this filetype. You should optimize
  26.  ;this routine to obtain maximum speed.
  27. endif
  28.  
  29. if {cmd} eq "write"
  30.  ;Save description {desc} in {file}.
  31. endif
  32.  
  33. if {cmd} eq "delete"
  34.  ;Delete description from {file}. Will be executed when the user
  35.  ;activates the KILL/S switch.
  36. endif
  37.  
  38. if {cmd} eq "execute"
  39.  ;Perform an action on {file} (unpack, view, read etc...) This function
  40.  ;will be called each time the user presses the action-button, or if
  41.  ;the EXECUTE/S switch is active.
  42. endif
  43.  
  44. if {cmd} eq "edit"
  45.  ;Here you may start an alternative description editor
  46.  ;If nothing is stated, the env:viewdiz/editor.s
  47.  ;script will be launched. Must not detach itself from CLI.
  48. endif
  49.  
  50. if {cmd} eq "info"
  51.  ;Set some info about this module. Alter only text in uppercase.
  52.  setenv viewdiz/.minf "*"{file}*"" FLAGS ITEM DEFAULT PATTERN FILETYPE
  53. endif
  54. ;$VER: ViewDIZ-???.module ver.rev (dd.mm.yy) yourname
  55.